<?php
/**
 * DESC: 内容列表
 * 作者:晨光
 * EMAIL:461718846@qq.com
 * DATE:2020/5/2
 */

namespace app\common\model;


use think\Model;
use think\model\concern\SoftDelete;

class Article extends Model
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = 0;
    /**
     * 分类表
     */
    public function cate(){
        return $this->belongsToMany('ArticleCate','ArticleCateRelated');
    }
    /**
     * 关联分类表
     */
    public function cateRelated(){
        return $this->hasMany('ArticleCateRelated');
    }
}
